#ifndef OPERATIONPARSER_H_
#define OPERATIONPARSER_H_

#include <string>
#include <vector>
#include "Messages.h"

using namespace std;

class OperationParser {
private:
	RequestMessage request;

	void clearRequest();
	void populateRequest(const string &raw);

	vector<string>& splitString(const string &s, char delim, vector<string> &elems);
	vector<string> splitString(const string &s, char delim);
	bool isWhiteSpace(const string &s);

public:
	OperationParser();
	virtual ~OperationParser();

	bool parse(string line);
	RequestMessage getRequest();
};

#endif /* OPERATIONPARSER_H_ */
